This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
I need to generate pdfs from lotus notes documents and store it in shared folder. I have downloaded pdfcreator2.1.2 and I'm getting error 'INITIALIZE cannot create automation object' at line 'Set PDFCreator = CreateObject("PDFCreator.clsPDFCreator")' .. quick help on this will be really appreciate. If there is any other way, please mail me at t.raviachari@gmail.com. Thank you
----------------
On Error GoTo ErrorHandler
Dim docSelected As NotesDocument
Dim uiWS As NotesUIWorkspace
Dim uiDocCurrent As NotesUIDocument
Dim sPDFPath As String
Dim PDFCreator As Variant
Set uiWS = New NotesUIWorkspace
Set docSelected = doc
Set uiDocCurrent = uiWS.Editdocument(False, docSelected)
Dim rti As NotesRichTextItem
Set rti = docSelected.GetFirstItem("Body")
Dim rtnav As NotesRichTextNavigator
Set rtnav = rti.CreateNavigator
If rtnav.FindFirstElement(RTELEM_TYPE_SECTION) Then
Call uiDocCurrent.Expandallsections()
End If
Set PDFCreator = CreateObject("PDFCreator.clsPDFCreator")
If Not PDFCreator.cStart("",True) Then
MsgBox "PDFCreator printer is not installed",16,"PDFCreator"
Exit Sub
End If
sPDFPath = CStr(strTargetFolder) & "\"
With PDFCreator
.cOption("UseAutosave") = 1
.cOption("UseAutosaveDirectory") = 1
.cOption("AutosaveDirectory") = sPDFPath
.cOption("AutosaveFilename") = "Test.pdf"
.cOption("AutosaveFormat") = 0
.cOption("OptionsVisible") = 0
.cOption("PDFOptimize") = 1
.cClearCache
End With